/*
 * ScrollPaneDemo.java  0.4.0 / Oct 24, 2010
 *
 * Copyright (c) 2010 - 2011, cute4j.com and contributors.
 *
 * This software is licensed under the LGPL version 2.1 license.
 * A copy of this license is included in the file LICENSE-LGPL.txt.
 */
package com.cute4j.demos.swingset;

import com.cute4j.swing.Component;
import com.cute4j.swing.ImageIcon;
import com.cute4j.swing.Label;
import com.cute4j.swing.ScrollPane;

/**
 * Demonstration of the ScrollPane class.
 *
 * @author Slobodan Vrkacevic
 * @version 0.4.0
 */
public class ScrollPaneDemo extends DemoModule {

// Public Constructors. --------------------------------------------------------

  /**
   * Constructs new ScrollPaneDemo object.
   */
  public ScrollPaneDemo() {
    super("ScrollPane Demo", "Demonstration of the ScrollPane class.");
  }

// Overridden Methods. ---------------------------------------------------------

  /**
   * {@inheritDoc}
   */
  protected Component buildDemoComponent() {
    String imageName = "resources/images/scrollpane/crayons.png";
    ImageIcon image = new ImageIcon(loadResource(imageName));
    return new ScrollPane(new Label(image));
  }

// Main Method. ----------------------------------------------------------------

  /**
   * Starts demo as standalone application.
   *
   * @param args the application arguments
   */
  public static void main(String[] args) {
    new ScrollPaneDemo().show();
  }

}
